package java03;

import java.util.ArrayList;
import java.util.Random;

public class Member extends Manager{
	private String username;
	private int money;
	
	
	
	public Member(String username,int money) {
		super(username,money);
		this.username=username;
		this.money=money;
	}
	
	public void receive(ArrayList<Integer> redList){
		int index = new Random().nextInt(redList.size());
		Integer delta = redList.remove(index);
		int money=this.getMoeny()+delta;
		this.setMoney(money);
	}
}

